package com.lyrcsoft.autoconfigure;

import java.util.List;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.io.support.SpringFactoriesLoader;
import org.springframework.core.type.AnnotationMetadata;

/**
 * 功能描述
 *
 * @author fujc-dev@qq.com
 * @date: 2023年12月01日 9:45
 */

public class DataBaseConfigSelector implements ImportSelector {

    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        List<String> configClassNames = SpringFactoriesLoader.loadFactoryNames(EnableDataBaseClient.class, this.getClass().getClassLoader());
        return configClassNames.toArray(new String[0]);
    }
}
